package test.nome;

import develop.framework.Audio;
import develop.framework.Game;
import develop.framework.Graphics;
import develop.framework.Graphics.PixmapFormat;
import develop.framework.Screen;

public class LoadingScreen extends Screen {
	
	public LoadingScreen(Game game) {
		super(game);
	}
	
	@Override
	public void update(float deltaTime) {
		Graphics g = game.getGraphics();
		
		Assets.background = g.newPixmap("img/background.png", PixmapFormat.RGB565);
		Assets.logo = g.newPixmap("img/logo.png", PixmapFormat.ARGB4444);
		Assets.mainMenu = g.newPixmap("img/mainmenu.png", PixmapFormat.ARGB4444);
		Assets.buttons = g.newPixmap("img/buttons.png", PixmapFormat.ARGB4444);
		Assets.help1 = g.newPixmap("img/help1.png", PixmapFormat.ARGB4444);
		Assets.help2 = g.newPixmap("img/help2.png", PixmapFormat.ARGB4444);
		Assets.help3 = g.newPixmap("img/help3.png", PixmapFormat.ARGB4444);
		Assets.numbers = g.newPixmap("img/numbers.png", PixmapFormat.ARGB4444);
		Assets.ready = g.newPixmap("img/ready.png", PixmapFormat.ARGB4444);
		Assets.pause = g.newPixmap("img/pausemenu.png", PixmapFormat.ARGB4444);
		Assets.gameOvar = g.newPixmap("img/gameover.png", PixmapFormat.ARGB4444);
		Assets.headUp = g.newPixmap("img/headup.png", PixmapFormat.ARGB4444);
		Assets.headLeft = g.newPixmap("img/headleft.png", PixmapFormat.ARGB4444);
		Assets.headDown = g.newPixmap("img/headdown.png", PixmapFormat.ARGB4444);
		Assets.headRight = g.newPixmap("img/headright.png", PixmapFormat.ARGB4444);
		Assets.tail = g.newPixmap("img/tail.png", PixmapFormat.ARGB4444);
		Assets.stain1 = g.newPixmap("img/stain1.png", PixmapFormat.ARGB4444);
		Assets.stain2 = g.newPixmap("img/stain2.png", PixmapFormat.ARGB4444);
		Assets.stain3 = g.newPixmap("img/stain3.png", PixmapFormat.ARGB4444);
		
		Audio a = game.getAudio();
		Assets.click = a.newSound("snd/click.ogg");
		Assets.eat = a.newSound("snd/eat.ogg");
		Assets.bitten = a.newSound("snd/bitten.ogg");
		
		Settings.load(game.getFileIO());
		
		game.setScreen(new MainMenuScreen(game));
	}
	
	@Override
	public void present(float deltaTime) {
	}
	
	@Override
	public void pause() {
	}
	
	@Override
	public void resume() {
	}
	
	@Override
	public void dispose() {
	}
}
